import requests
import app
from app import BASE_URL


class LoginApi:
    def __init__(self):
        self.url = BASE_URL + "/api/sys/login"

    def test_login(self, data):
        response = requests.post(url=self.url, json=data, headers=app.HEADERS)
        return response


if __name__ == '__main__':

    login = LoginApi()

    a = login.test_login({"mobile": "13800000002", "password": "123456"})
    print(a.json())
